package test1;

public class GameTest {
    public static void main(String[] args) {
        //创建对象
        Role r1 = new Role("春丽",100);
        Role r2 = new Role("隆",100);
        //轮回格斗
        while(true) {
            //r1攻击r2
            r1.arratck(r2);
            if(r2.getBlood()==0){
                System.out.println(r1.getName()+"KO"+r2.getName());
                break;
            }
            r2.arratck(r1);
            if(r1.getBlood()==0){
                System.out.println(r2.getName()+"KO"+r1.getName());
                break;
            }
        }
    }
}
